import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: "",
    userId: '',
    userType: ''
  },
  mutations: {
    loginVue(state,payload){
      state.token = payload.token;
      state.userId = payload.userId;
      state.userType = payload.userType;
    }
  },
  actions: {
    loginVue(context,payload){
      context.commit('loginVue',payload)
    }
  },
  modules: {
  }
})
